<?php
declare(strict_types=1);
echo "3+4=",sum(3,4),"\n";
function sum(int|float|string $x,int|float|string $y):int|float|false{//定义函数
    if ($x>=10||$y>=10)return false;//失败时返回false
     return$x+$y;
}
//函数参数，返回值类型及严格模式
echo "3.6+4.8=",sum(3.4,4.8),"\n";
echo "3.6+4.8=",sum('3.4','4.8'),"\n";
var_dump(sum(12,9));
